open BUFF,"snps_in_gene.txt" or die "no file exists\n";
while(<BUFF>)
{
	chomp($_);
	@a = split(/\t/,$_);
	#$hash{$a[0]} = $a[1];
	@b = split('__',$a[1]);
	for($i=0;$i<@b;$i++)
	{
		if(exists($hash{$b[$i]}))
		{
			$hash{$b[$i]} = $hash{$b[$i]}."\n".$a[0];

		}
		else
		{
			$hash{$b[$i]} = $a[0];
		}
		
	}
}
open(BUFF,"TopsnpList.txt");
while(<BUFF>)
{
        chomp($_);
	if(exists($hash{$_}))
	{
		print $hash{$_}."\n";
	}
}
